﻿<Application 
    x:Class="HomeWP.App"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"       
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone">

    <!--Application Resources-->
    <Application.Resources>
        <!-- The template for city items -->
        <DataTemplate x:Key="deviceItemTemplate">
            <StackPanel Grid.Column="2"  VerticalAlignment="Top" Orientation="Horizontal" Margin="0,2">
                <TextBlock Text="{Binding DisplayName}" FontSize="24"  Margin="12,-10,12,2"/>
                <TextBlock Text="{Binding Address}" FontSize="14" Foreground="GreenYellow" Margin="6,0,0,0" />
            </StackPanel>
        </DataTemplate>

        <!-- The group header template, for groups in the main list -->
        <DataTemplate x:Key="groupHeaderTemplate">
            <Border Background="YellowGreen" Margin="6">
                <TextBlock Text="{Binding Key}" FontSize="24" Foreground="Black"/>
            </Border>
        </DataTemplate>

        <DataTemplate x:Key="groupItemTemplate" >
            <Border Background="#FFF6CD32" Margin="6">
                <TextBlock Text="{Binding Key}" FontSize="24" Foreground="Black"/>
            </Border>
        </DataTemplate>

    </Application.Resources>



    <Application.ApplicationLifetimeObjects>
        <!--Required object that handles lifetime events for the application-->
        <shell:PhoneApplicationService 
            Launching="Application_Launching" Closing="Application_Closing" 
            Activated="Application_Activated" Deactivated="Application_Deactivated"/>
    </Application.ApplicationLifetimeObjects>

</Application>